package com.gxa.employment.exception;

/**
 * @Description:
 * @Author:
 * @DateTime: 2024/12/18 20:01
 **/
public enum ErrorMessage {
    NO_PERMISSION(401, "权限不足"),
    TOKEN_LOSE(50001, "token不存在,请重新登录"),
    TOKEN_ERROR(50002, "token错误"),
    TOKEN_EXPIRED(50003, "token已失效,请重新登录"),
    INPUT_EMPTY(50004, "输入不能为空"),
    PHONE_OR_PWD_ERROR(50005, "手机号或者密码错误"),
    DUPLICATE_DATA(50006, "该数据已存在，请重新输入"),
    ERROR_FORMAT(50007, "数据格式错误"),
    SMS_SEND_ERROR(50008, "短信发送错误，请检查后重试"),
    ;


    private String message;
    private Integer code;

    ErrorMessage() {
    }

    ErrorMessage(Integer code, String message) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "ErrorMessage{" +
                "message='" + message + '\'' +
                ", code=" + code +
                "} " + super.toString();
    }
}
